package com.itheima.neibulei;

import java.util.Random;

public interface Demo6 {
    int ran();
}
class TP{
    public static void main(String[] args) {
        get(new Demo6() {
            @Override
            public int ran() {
                Random ran=new Random();
                int r=ran.nextInt(100);
                return r;
            }
        });
        get(()->{  Random ran=new Random();
            int r=ran.nextInt(100);
            return r;});
    }

    public static void get(Demo6 d){
        int ran=d.ran();
        System.out.println(ran);
    }
}